package cate.game.pvp.pointrace.handler;

import cate.game.pvp.pointrace.data.PointRaceOpponent;
import cate.game.role.pvp.PvpRecord;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

public interface PointRaceChallenge {

    @NoArgsConstructor
    @ToString
    @Data
    class ChallengeParam {
        private PointRaceOpponent oppA;
        private PointRaceOpponent oppB;
        private byte winner;

        public static ChallengeParam of(PointRaceOpponent oppA, PointRaceOpponent oppB, byte winner) {
            ChallengeParam param = new ChallengeParam();
            param.setOppA(oppA);
            param.setOppB(oppB);
            param.setWinner(winner);
            return param;
        }
    }

    PvpRecord handleChallenge(ChallengeParam param);
}
